Skip to contentMethod: action(Character, Buffer, String)
      1: /**
2:  * 
3:  */
4: package scanner;
5: 
6: import model.Position;
7: import symbols.AbstractSymbol;
8: import symbols.BracketCloseSymbol;
9: import symbols.UnknownSymbol;
10: import basic.Buffer;
11: 
12: /**
13:  * @author Hendrik
14:  * 
15:  */
16: public class ConditionEndState extends AbstractState {
17:         /**
18:          * This constructor initialize the new ConditionEndState.
19:          * 
20:          * @param myScanner
21:          *            is the used scanner.
22:          * @param beginningColumn
23:          *            is the Begin Column of the Symbol
24:          * @param beginningRow
25:          *            is the beginning row of the symbol
26:          */
27:         public ConditionEndState(final Scanner myScanner, final Integer beginningColumn,
28:                         final Integer beginningRow) {
29:                 super(myScanner, beginningColumn, beginningRow);
30:         }
31: 
32:         /*
33:          * (non-Javadoc)
34:          * 
35:          * @see scanner.AbstractState#action(java.lang.Character, basic.Buffer, java.lang.String)
36:          */
37:         @Override
38:         public AbstractState action(final Character character,
39:                         final Buffer<AbstractSymbol> currentResult, final String dataPath)
40:                         throws InterruptedException {
41:•                if (character.equals(ScannerConstants.BRACKETCLOSESIGN)) {
42: 
43:                         currentResult.put(new BracketCloseSymbol(new Position(getBeginningRow(),
44:                                         getBeginningColumn(), dataPath)));
45: 
46:                 } else {
47:                         currentResult.put(new UnknownSymbol(character.toString(), new Position(
48:                                         getBeginningRow(), getBeginningColumn(), dataPath)));
49: 
50:                 }
51:                 this.getMyScanner().skip();
52:                 return this.getMyScanner().getSelectionState();
53: 
54:         }
55: 
56:         /*
57:          * (non-Javadoc)
58:          * 
59:          * @see scanner.AbstractState#finish(basic.Buffer, java.lang.String)
60:          */
61:         @Override
62:         protected void finish(final Buffer<AbstractSymbol> currentResult, final String dataPath)
63:                         throws InterruptedException {
64: 
65:         }
66: 
67: }